package com.iweb.test;

public class Student {
    //成员变量
    private String name;
    private String sex;
    private int    age;
    private String number;

    //用一对setXXX和getXXX来访问成员变量
    public void setName(String name){
        this.name=name;
    }
    public String getName(){
        return name;
    };

    public void setAge(int age){
        this.age=age;
    }
    public int getAge(){
        return age;
    };

    public void setSex(String sex){
        this.sex=sex;
    }
    public String getSex(){
        return sex;
    };

    //成员方法
    public void sleep(){
        System.out.println("睡觉");
    }
    public void  moving(){
        System.out.println("移动");
    };
}
